import java.util.Scanner;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/7 10:50
 * @Copyright 博为峰
 */
public class SwitchDemo {
    public static void main(String[] args) {
        /*
           switch(表达式){ int short byte char String 枚举
             case 值1：
               执行语句;
               break;
             case 值2：
               执行语句;
               break;
              ...
             default:
               执行语句;
           }
         */

        String s = "a";
        switch (s) {
            case "a":
                System.out.println("a");
                break;
            case "b":
                System.out.println("b");
                break;
            case "c":
                System.out.println("c");
                break;
            default:
                System.out.println("default");
        }

        //根据用户输入的月份，输出对应的天数
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        int i = Integer.parseInt(s1);
        switch (i) {
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                System.out.println("31天");
                break;
            case 2:
                System.out.println("29天");
            case 4:
            case 6:
            case 9:
            case 11:
                System.out.println("30天");
                break;
            default:
                System.out.println("无");
        }
    }
}
